﻿<%@ Page Language="C#" MasterPageFile="~/PresentationLayer/Split.Master" AutoEventWireup="true" CodeBehind="VerPercTest.aspx.cs" Inherits="Distrackting.PresentationLayer.VerPercTest" Title="Distrackting: Testemunhos " %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="side" runat="server">
<div class="border box small">
<h2><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></h2>
<ul>
<li><asp:HyperLink ID="HyperLink4" runat="server">Ficha técnica</asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink1" runat="server">Mapa</asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink2" runat="server">Fotos</asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink3" runat="server">Testemunhos</asp:HyperLink></li> 
</ul>
</div>
<div class="blank"></div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="rest" runat="server">
<div class="large box border">
    Testemunhos
    <asp:DetailsView ID="DetailsView_Testemunhos" runat="server" Height="50px" 
        Width="393px" AllowPaging="True" AutoGenerateRows="False" 
        DataSourceID="ObjectDataSource_Testemunhos">
        <Fields>
            <asp:TemplateField HeaderText="Utilizador" SortExpression="cod_utilizador">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Utilizador.nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("cod_utilizador") %>'></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("cod_utilizador") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Data" SortExpression="data_realizado">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("data_realizado") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("data_realizado") %>'></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("data_realizado") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Descrição" SortExpression="texto">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("texto") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("texto") %>'></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("texto") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Rating" SortExpression="rating">
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("rating") %>'></asp:Label>
                    <asp:Image ID="Image1" runat="server" 
                        DescriptionUrl="~/PresentationLayer/Images/rate_star_25x23.png" 
                        ImageUrl="~/PresentationLayer/Images/rate_star_25x23.png" Width="16px" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("rating") %>'></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("rating") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
        </Fields>
    </asp:DetailsView>
    <asp:ObjectDataSource ID="ObjectDataSource_Testemunhos" runat="server" 
        SelectMethod="getTestemunhosByPercurso" 
        TypeName="Distrackting.BusinessLayer.GerirPercursos">
        <SelectParameters>
            <asp:QueryStringParameter Name="cod_perc" QueryStringField="perc" 
                Type="Object" />
        </SelectParameters>
    </asp:ObjectDataSource>
</div>
</asp:Content>
